<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
  <meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" /> 
  <meta name="format-detection" content="telephone=no">
  <meta name="apple-mobile-web-app-status-bar-style" content="black">
  <meta name="apple-mobile-web-app-capable" content="yes">
  <link rel="stylesheet" type="text/css" href="__PUBLIC__/css/index.css"> 
  <script type="text/javascript" src="__PUBLIC__/js/jquery-1.11.3.min.js"></script>
  <title>私宠订制</title>
</head>
<body class="body_in">
<div class="show_z_index"></div>
<div class="show_content">
  <div class="close"><img src="__PUBLIC__/img/close.png"/></div>
  <textarea>{$show_content}</textarea>
  <a href="tel:{$tel}"><div class="welcome_font_in closetel">呼叫主人</div></a>
</div>

<div  class="in_one">
  <div>
  	<img src="__PUBLIC__/img/logo.png"/>
  </div>
  <div class="welcome_font">欢迎使用私宠订制</div>
  <div class="welcome_font">WWW.CWLYZ.CN</div>
  <a href="http://www.cwlyz.cn/index.php/Wap/Home/loseinfo_Jump_Wapindex/tel/{$tel}/password/{$password}"><div class="welcome_font_in">进入官网</div></a>
  <!-- <a href="{:U('Index/use_gongneng')}"><div class="welcome_font_in">信息录入</div></a> -->
  <a href="{:U('Index/petInfo')}"><div class="welcome_font_in">{$petname}的信息</div></a>
  <a href="tel:{$shop_tel}"><div class="welcome_font_in">医疗询问</div></a>
  <a href="{:U('Index/photo')}"><div class="welcome_font_in">{$petname}的相册</div></a>
  <a href="tel:{$tel}"><div class="welcome_font_in closetel">呼叫{$petname}的主人</div></a>
</div>
<script>
  var ls_status="<?php echo $show_status; ?>";
  if(ls_status==1){
    $('.show_z_index,.show_content').show();
  }
  $('.close').click(function(){
    $('.show_z_index,.show_content').hide();
  })
</script>

<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=dRUrTiX4xnubXnGkqGrBU8jSfNBtXP6n"></script>
 <div id="allmap" style="width: 100%;height: 500px; display:none;"></div>
<script type="text/javascript">
    // 百度地图API功能
    var map = new BMap.Map("allmap");
    var point = new BMap.Point(108.95,34.27);
    map.centerAndZoom(point,20);
    var geolocation = new BMap.Geolocation();
    geolocation.getCurrentPosition(function(r){console.log(r.point)
        if(this.getStatus() == BMAP_STATUS_SUCCESS){
            var mk = new BMap.Marker(r.point);
            map.addOverlay(mk);//标出所在地
            map.panTo(r.point);//地图中心移动
            //alert('您的位置：'+r.point.lng+','+r.point.lat);
            var point = new BMap.Point(r.point.lng,r.point.lat);//用所定位的经纬度查找所在地省市街道等信息
            var gc = new BMap.Geocoder();
            gc.getLocation(point, function(rs){
               var addComp = rs.addressComponents; console.log(rs.address);//地址信息
               $.post("{:U('Index/ipadd')}",{lnt:r.point.lng,lat:r.point.lat,address:rs.address},function(){
               })
            });
        }else {

            alert('failed'+this.getStatus());
        }        
    },{enableHighAccuracy: true})
</script>
</body>
</html>